UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uXhk6yyF8a6MHZEkQ8PnElKrpaxh5BGJaf6bVTSpsTA='
WHERE
key_id = 'dd85fd49c1009cddd3dcd43e1c06bdaab196552c22a0026a4def47c8b962e4b4'
AND (
token = 'uXhk6yyF8a6MHZEkQ8PnElKrpaxh5BGJaf6bVTSpsTA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)