UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+iGNT5JIDWVtNsXaMSzaR0icwAUqoJLlqkAnqaApDgk='
WHERE
key_id = 'fa988e3dbc90926308dc31423c687628d50760cd099b28ae45a618d4d0177c8d'
AND (
token = '+iGNT5JIDWVtNsXaMSzaR0icwAUqoJLlqkAnqaApDgk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)