UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vlD9WDm26YtmgnnJetEVLgpcbN8zdJFurW72z++5Ook='
WHERE
key_id = '6b28280e33ab2471021cb8993c62504a0b3eafbe3351944b3eef002d72162470'
AND (
token = 'vlD9WDm26YtmgnnJetEVLgpcbN8zdJFurW72z++5Ook='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)