UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v8Rb9Dlk/oWLV97rLLmQs8lCWvBx8zD5hi8EbFk3dKc='
WHERE
key_id = '4c4bb68112af9390ed131d3319d1851d3060a65ef4957ef5b5ebb6c3e780c766'
AND (
token = 'v8Rb9Dlk/oWLV97rLLmQs8lCWvBx8zD5hi8EbFk3dKc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)