UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j9HUf34lCr+gxkrR0VeyYc74EhyUZ/mdS3DaL7rOX1M='
WHERE
key_id = 'f83c93b75cd32c4b54c03a0c29d4acc5f888406ccfdae1cba54e16f46860318b'
AND (
token = 'j9HUf34lCr+gxkrR0VeyYc74EhyUZ/mdS3DaL7rOX1M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)