UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GKeRB//M3iw+QxPbAtI2AB/AeWBhZaAJ6kdNAPOyuhs='
WHERE
key_id = 'cfe54e0ffad928ff883a210dafa6048962b05d3225219129d94635f8405ad684'
AND (
token = 'GKeRB//M3iw+QxPbAtI2AB/AeWBhZaAJ6kdNAPOyuhs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)