UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Izr3FTj/BTIex0E4vorxMIHn6M/OJJa5WRLp4NsLs9E='
WHERE
key_id = '190596fbe75b4510a2c284f2c693e76c3d7817a7cc9a5e67888f80111633d79f'
AND (
token = 'Izr3FTj/BTIex0E4vorxMIHn6M/OJJa5WRLp4NsLs9E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)