UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zhk2Y64ivg+mrxyiHwNQ72rzQOAjun3KR9hbEZkJnAo='
WHERE
key_id = 'bb99dff0bc245334ab3045c5b77b35976c4a156a162a6aa9b5097d0155d8c93a'
AND (
token = 'zhk2Y64ivg+mrxyiHwNQ72rzQOAjun3KR9hbEZkJnAo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)