UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WdPPalbbQTZjxgpgffhLP/xoerPCIITX8h0s1YgF0Lg='
WHERE
key_id = '093b5b592e650f30baad4c86237c3473882dd5da52a46100cca50b1759753dc8'
AND (
token = 'WdPPalbbQTZjxgpgffhLP/xoerPCIITX8h0s1YgF0Lg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)