UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vkMkcgGkxIZ5sClSRYU74bOxX66KIX8uerBD27nI4B8='
WHERE
key_id = '13f14d663c0d4efe214bd2f08fdb746a7749a5fcb98a7ccd39a87c888ccf8851'
AND (
token = 'vkMkcgGkxIZ5sClSRYU74bOxX66KIX8uerBD27nI4B8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)