UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hU/40K+kbJDZt/hwo6ErU/K9sg4HintYNHfDQfSEpbs='
WHERE
key_id = '98d0563552a4c142a31a1c9ff5cbdbe96e3b39a375c86c18e4c1a45f6198cde7'
AND (
token = 'hU/40K+kbJDZt/hwo6ErU/K9sg4HintYNHfDQfSEpbs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)