UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oL6TopTZqxfPnxizup/CsxNsEtjsxLv2Y/HJhmlDXpg='
WHERE
key_id = '610b22713c93317e0461957cc34713ad790833d13accb9419049bd271681d75f'
AND (
token = 'oL6TopTZqxfPnxizup/CsxNsEtjsxLv2Y/HJhmlDXpg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)