UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eqmmOCgaXoLUNqrf83wsg8XfjpkyglA/vx9xaWVbj0o='
WHERE
key_id = 'fcb4744eabe545731fd730a7d5f6d9c320e3bb372c4d59d7f4afdcb1e5d2f5d0'
AND (
token = 'eqmmOCgaXoLUNqrf83wsg8XfjpkyglA/vx9xaWVbj0o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)