UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fcowCHCXM/dUGieEHDXboIxis3ZxMPR8YOMMqmapZLE='
WHERE
key_id = 'ad370c764b544cbfc4210a2afc6b4ec9c4c48b8464e42a7c209bda980c4db577'
AND (
token = 'fcowCHCXM/dUGieEHDXboIxis3ZxMPR8YOMMqmapZLE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)