UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sqjlU3FIyiNCVwlwFOBiE4cdwc9ij9ZGzx4rqZ+NgNU='
WHERE
key_id = '2cd15d177a837e850a5bbdfa8d03fc8c14b02c7b98155f4131bc6c6cfbc02e34'
AND (
token = 'sqjlU3FIyiNCVwlwFOBiE4cdwc9ij9ZGzx4rqZ+NgNU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)