UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iF3pSvZ875FXCbCNXCyVkNK/y1HoAlyThrB8ymgRH1Y='
WHERE
key_id = '30054a6a403c2ab5457a326af8120e103f3730cae539aa451c5782240f298c67'
AND (
token = 'iF3pSvZ875FXCbCNXCyVkNK/y1HoAlyThrB8ymgRH1Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)