UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jT/L5UrXRT4yq3tMcL1uJnSsQkdlFuBK2bw3Iid14CM='
WHERE
key_id = '674b01a6b3ce829092fc712449e8f5959d6633ba1493ff67ce7d8960774892b3'
AND (
token = 'jT/L5UrXRT4yq3tMcL1uJnSsQkdlFuBK2bw3Iid14CM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)