UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FHsR6BH12hAnYgAHHI/PRcTxCdaHFjPLdlZSUauWqK4='
WHERE
key_id = '5a69d08ac47a69734530f73fa177a3ca645bee00c1c010a2e3aa21dbf375d42a'
AND (
token = 'FHsR6BH12hAnYgAHHI/PRcTxCdaHFjPLdlZSUauWqK4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)