UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1DCXFwsIpkPyIsC4Ibm+37ENx1kwrr9dAwEY2L1pDAE='
WHERE
key_id = 'ce9016066325d0e3a9f9ed3f497a92623a792827672e4e49b0a63b3a04e2f6fb'
AND (
token = '1DCXFwsIpkPyIsC4Ibm+37ENx1kwrr9dAwEY2L1pDAE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)