UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2fCUIWyvwl3D19RhWUxHPIRERZURt7ViIJi0YEVtGUo='
WHERE
key_id = 'dcc5da412219c923696f96e40a163fe789bacfe32c5ca182cb8ddcd83a524235'
AND (
token = '2fCUIWyvwl3D19RhWUxHPIRERZURt7ViIJi0YEVtGUo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)