UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/fKQYNcnFDQZH/gTAa/mVJJX6vwr6twNq07iMPClR8o='
WHERE
key_id = 'ec4e3574fa3730cfafdfde607245bd8a39599917e58fdbca16214ea2d42e885b'
AND (
token = '/fKQYNcnFDQZH/gTAa/mVJJX6vwr6twNq07iMPClR8o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)