UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YDwjTus277g+ay/UUM0O6+H3JGgRpV6GAlZTqthN/To='
WHERE
key_id = '5726f17d5980da9d5a0f5b133be2a887476298a78951f41cca3feccdac1e9bce'
AND (
token = 'YDwjTus277g+ay/UUM0O6+H3JGgRpV6GAlZTqthN/To='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)