UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm/4WHzvtk4+UqkqEE2zmAjgmBc/6KABT3ZaxLCW21cc='
WHERE
key_id = '70f0d3e3a6e918d036bb76574694b5197f2e1779101a565d78da343040754762'
AND (
token = 'm/4WHzvtk4+UqkqEE2zmAjgmBc/6KABT3ZaxLCW21cc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)