UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FHwqdv/i/BNd+FPGEyOHaNlIfW1jsejfw2UOGfVEuAM='
WHERE
key_id = '9b89d9f74049202e01d06cfb8f38d7cd427c81bb10a884485f3be5d21e138a72'
AND (
token = 'FHwqdv/i/BNd+FPGEyOHaNlIfW1jsejfw2UOGfVEuAM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)