UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wLkCq0LVWicA+Z2NIwpfQT2+K57Fx8VlVXSs3e9pwWo='
WHERE
key_id = '0811cab883ae7b222e48616c9de5749961d5e067ca3126ccf31b39abd200d51c'
AND (
token = 'wLkCq0LVWicA+Z2NIwpfQT2+K57Fx8VlVXSs3e9pwWo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)