UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DAIOB3l70weNU9w3XSzFMLA8ndxKUI9IrF/4wZHolU8='
WHERE
key_id = '90aed5c84f3cfa40068d7c7abbedef0dc6843adb6353deddcc948a7a75b4d537'
AND (
token = 'DAIOB3l70weNU9w3XSzFMLA8ndxKUI9IrF/4wZHolU8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)