UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pdSoneNWtNd5UHx8krS9LWas9xQ/Jxkmo/sVdUU/XIU='
WHERE
key_id = '5ee2aaf04ccbe54ad6453aa388ea213f7b00821bcd4628ec110622d75653d163'
AND (
token = 'pdSoneNWtNd5UHx8krS9LWas9xQ/Jxkmo/sVdUU/XIU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)