UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qnVSmpzrj+9BdiU0GKuiqKRRbsGOlBwSqA/UmTHP7hQ='
WHERE
key_id = '16b81eb1f29970a85a0285ea125617fd1abc26564611b81e996278b1436601be'
AND (
token = 'qnVSmpzrj+9BdiU0GKuiqKRRbsGOlBwSqA/UmTHP7hQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)