UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/zA20Mf8guCySxfeXmXivsaAWJ/pSYzgtTBjhZdrmKo='
WHERE
key_id = '4adcb35366d4faa998598450de68581d8c0596983bb23c951645452ac01f1d56'
AND (
token = '/zA20Mf8guCySxfeXmXivsaAWJ/pSYzgtTBjhZdrmKo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)