UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'u2PHu+4gdOAKoGruaq2C7fm3LhzaXdc5p+4Kp8fiHgQ='
WHERE
key_id = '96e3e437243aaeea9d7b955794fe66ce4b03d8a17b3c6eb966b57e7c784bb070'
AND (
token = 'u2PHu+4gdOAKoGruaq2C7fm3LhzaXdc5p+4Kp8fiHgQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)