UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qCoItVLAv+jjeood2F2jKwZgxPwPbIPjt+OwPyPhYzU='
WHERE
key_id = '920866ad525a30532abe8b2573e8514ca8ead7e58c46b09561aa72e2c4592210'
AND (
token = 'qCoItVLAv+jjeood2F2jKwZgxPwPbIPjt+OwPyPhYzU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)