UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QbobGRHJqmyYzDS3t762/ILZr2sOWuQovGa3f32UwqI='
WHERE
key_id = '62d4cd1963dbf6204c508e12802018ef8932c1f727cfa9bf4f3467ea486df586'
AND (
token = 'QbobGRHJqmyYzDS3t762/ILZr2sOWuQovGa3f32UwqI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)